import projectRequest from "./request";
import {FavoriteCountParams} from "../interface/FavoriteCountInterface";

/**
 * 时间： 2024年3月21日 09点18分
 * 关于用户收藏等操作
 */

/**
 * 添加用户收藏歌单,这里我们使用参数将其分为两个方法,方便调用
 * @param params
 */
export function insertFavoriteApi(data:FavoriteCountParams){
  return projectRequest.request({
    method:"post",
    url:"/favoritecount/insert",
    data,
  });
}

/**
 * 取消用户收藏操作
 * @param params
 */
export function deleteFavoriteApi(params:FavoriteCountParams) {
  return projectRequest.request({
    method:"delete",
    url:"/favoritecount/delete",
    params
  });
}


export function getFavoriteMusicCollectApi(params:FavoriteCountParams) {
  return projectRequest.request({
    method:"get",
    url:"/favoritecount/page/musiccollect",
    params
  });
}

export function getFavoriteAlbumApi(params:FavoriteCountParams) {
  return projectRequest.request({
    method:"get",
    url:"/favoritecount/page/album",
    params,
  });
}

